|
|
Ok, Help..... I worked till the wee hours and the liquid still does not work
yet (one thing at a time.... :-), anyone see something wrong with the code?
#declare tube_rack=
difference{
union{
box { <-8,-0,-3>
<8,2,3>}
box { <-8,7,-3>
<8,8,3>}
cylinder { <-7,0,2>
<-7,9,2> .4}
cylinder { <7,0,2>
<7,9,2> .4}
cylinder { <-7,0,-2>
<-7,9,-2> .4}
cylinder { <7,0,-2>
<7,9,-2> .4} }
union{
#declare counter =0;
#while (counter <5)
sphere { <-6+(3*counter) ,1,0> 1.1}
cylinder { <-6+(3*counter),1,0>
<-6+(3*counter),15,0> 1.1 }
#declare counter= counter+1
#end}}
#declare liquid_color= rgbf <1,.6,.6,.9>
//declare the final filled rack
#declare filled_rack=
merge{
object {tube_rack texture{DMFWood6 rotate 25*y scale 6}
finish {reflection 0.0 ambient 0.4 diffuse 0.2 phong 0.2 phong_size
50}
normal {dents 0.2
scale 0.2}}
#declare counter = 0;
#while (counter<5)
object {test_tube
#if (test=1)
texture{pigment{rgbt <0.8,0.8,0.8,0.6>} finish{phong
1}}
#else
texture {
pigment { color rgbt <1,1,1, .98> }
finish {
specular 1
roughness 0.001
ambient .2
diffuse 0.2
reflection 0.1
phong 0.9
phong_size 100}}
interior{ior 2 fade_distance 2 fade_power 2 caustics 4}
#end
translate <-6+(3*counter) ,0,0>}
object {liquid
#if (test=1)
texture{pigment{rgb<1,0,0>}}
#else
texture{
pigment{color 1.9*liquid_color }
finish{reflection 0.4 ambient .8 diffuse .5
phong 1 phong_size 200}}
interior{ior 1.33 caustics 4}
#end
translate <-6+(3*counter) ,0,0>}
#declare counter = counter+1 ;
#end
}
>
Post a reply to this message
Attachments:
Download 'testtube.jpg' (59 KB)
Preview of image 'testtube.jpg'
|
|